from django.db import models

class audio(models.Model):
    filename = models.CharField(blank=True, max_length=20)
    content = models.TextField(blank=True)
    audio = models.FileField(upload_to="audio")
    posttime = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = "db_audio"

class voiceprint(models.Model):
    user = models.TextField(max_length=10)
    audio = models.FileField(upload_to="voiceprint")
    content = models.TextField(max_length=1024, blank=True)
    voiceprint = models.TextField(max_length=2048, blank=True)
    posttime = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = "db_voiceprint"


class img(models.Model):
    filename = models.CharField(blank=True, max_length=20)
    feature = models.CharField(blank=True, max_length=500)
    img = models.ImageField(upload_to="img")
    posttime = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = "db_img"

class recorder(models.Model):
    user = models.CharField(max_length=10)
    file = models.FileField(upload_to="recorder")
    content = models.TextField()
    posttime = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = "db_recorder"

class test(models.Model):
    name = models.CharField(max_length=10)
    user = models.CharField(max_length=10)
    file = models.CharField(max_length=200)
    content = models.TextField()
    posttime = models.DateTimeField(auto_now_add=True)

    class Meta:
        db_table = "db_test"